<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> 
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>   
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<link rel="stylesheet" href="${host_url}/css/app/common.css">
<link rel="stylesheet"  href="${host_url}/css/app/vipmember_upgrade.css">	
<script src="${host_url}/js/app/jquery.min.js"></script>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<title>会员中心</title>
<script type="text/javascript">
  document.getElementsByTagName('html')[0].style.fontSize = document.documentElement.clientWidth/50 + 'px';
  
  /* function fn_ticketGoUpGrade(level){
		window.webkit.messageHandlers.ios_open_page.postMessage('MemberUpgradeWithCouponViewController:::levelId->' + level+':::jumpIndex->2');
  } */
  
  /*用户注册协议*/  
  function fn_goRegisterProtocol(){
	window.webkit.messageHandlers.ios_open_page.postMessage('WKViewController:::url->${registerProtocol_url}:::webTitle->${app_name}用户注册协议:::isRefresh->YES');
  }
  function fn_goMemberLevelup(level) {
    window.webkit.messageHandlers.ios_open_page.postMessage('WKViewController:::url->${memberLevelup}?level='+level+':::webTitle->会员升级:::isRefresh->YES');
  }	
</script>

</head>
<body>
<input type="hidden" id="masterinfo_url" value="${masterinfo_url}" />
<div class="main">
	  <c:forEach items="${advance_privilege}" var="c" varStatus="ind">  
		  <c:if test="${c.level !=122}">
			  <c:if test="${'ios'==os}">
				<div class="flex-layout" onclick="fn_goMemberLevelup(${c.level})">
			 </c:if>
			 <c:if test="${'wechat'==os ||'web'==os}">
				<div class="flex-layout" id='{"name":"levelup", "params": {"level":${c.level }}}'>
			 </c:if>
			 <c:if test="${'android'==os}">
				<div class="flex-layout" onclick="android.startUrl('会员升级','${memberLevelup}?level=${c.level}')">
			 </c:if>
					<c:if test="${c.level==123 }">
						<p class="iconInner"><img src="${host_url}/img/icon_diamonds.png" alt=""></p>
					 </c:if>
					<c:if test="${c.level==196 }">
	               		<p class="iconInner"><img src="${host_url}/img/icon_platinum.png" alt=""></p>
	                </c:if>
					<c:if test="${c.level==124 }">
	               		<p class="iconInner"><img src="${host_url}/img/icon_gold.png" alt=""></p>
	                </c:if>
					 <c:if test="${c.level==125 }">
	               		<p class="iconInner"><img src="${host_url}/img/icon_silver.png" alt=""></p>
	                </c:if>
						<p><span>${c.level_name}</span><span>最高可享受<fmt:formatNumber value="${c.rate*10}" pattern="#0.0" maxFractionDigits="1"/>折优惠</span></p>
					<c:if test="${c.need_price !=null}">
						<fmt:parseNumber value="${c.need_price}"  integerOnly="false" var="cash"/>
						<c:if test="${cash <1 and cash >0}">
							<p class="costInner">￥${cash}</p>
						</c:if>
						 <c:if test="${cash >1}">
		              	    	<fmt:parseNumber value="${c.need_price}"  integerOnly="true" var="cash1"/>
		               			<p class="costInner">￥${cash1}</p>
		              	 </c:if>
					</c:if>
				</div>
			  </c:if>
	  </c:forEach>
	   <c:forEach items="${enjoy_privilege}" var="c" varStatus="ind">
		 <c:if test="${c.level !=122}">
			<div class="flex-layout" >
				<c:if test="${c.level==123 }">
					<p class="iconInner"><img src="${host_url}/img/icon_diamonds.png" alt=""></p>
				 </c:if>
				<c:if test="${c.level==196 }">
               		<p class="iconInner"><img src="${host_url}/img/icon_platinum.png" alt=""></p>
                </c:if>
				<c:if test="${c.level==124 }">
               		<p class="iconInner"><img src="${host_url}/img/icon_gold.png" alt=""></p>
                </c:if>
				<c:if test="${c.level==125 }">
               		<p class="iconInner"><img src="${host_url}/img/icon_silver.png" alt=""></p>
                </c:if>
					<p><span>${c.level_name}</span><span>最高可享受<fmt:formatNumber value="${c.rate*10}" pattern="#0.0" maxFractionDigits="1"/>折优惠</span></p>
				<c:if test="${c.level == member_level }">
					<p class="costInner new-costInner">当前等级</p>
				</c:if>
			</div>
		  </c:if>
	  </c:forEach> 
					<c:if test="${'ios'==os}">
						<div class="prompt" onclick="fn_goRegisterProtocol()">
					</c:if>
					 <c:if test="${'wechat'==os ||'web'==os}">
						<div class="prompt" id='{"name":"toRegisterProtocolBtn"}'>
					</c:if>
					<c:if test="${'android'==os}">
						<div class="prompt" onclick="android.startUrl('${app_name}用户注册协议','${registerProtocol_url}')">
					</c:if>
							<p>购买须知：</p>
							<p style="color:#828282;padding:3px 0 0;">成为会员即表示同意<a>《${app_name}会员-用户协议》</a></p>
						</div>
		 	
</div>
</body>
</html>